package com.tlgen.modules.dept.repository;

import com.tlgen.modules.dept.domain.Subject;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author: tlgen
 * @Discription: 用户持久层
 */
public interface SubjectRepository extends JpaRepository<Subject, Long>, JpaSpecificationExecutor<Subject> {

    /**
     * 根据名称查询
     * @param name
     * @return
     */
    Subject findByName(String name);

    /**
     *根据 PID 查询
     * @param pid
     * @return
     */
    List<Subject> findByPid(long pid);

}
